<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
<th:block th:include="common/common::common('新增用户')"/>
<link rel="stylesheet" href="/static/base/user/css/user.css" media="all"/>
<script src="/static/base/user/add.js" charset="utf-8"></script>
</head>
<body>
<form class="layui-form layui-form-pane" id="addBaseUserForm">
    <div class="layui-form-body">
        <div class="avatar-left">
            <div class="layui-form-item">
                <label class="layui-form-label">登录账户<span class="required">*</span></label>
                <div class="layui-input-block">
                    <input type="text" id="username" name="username" lay-verify="required" maxlength="18"
                           onkeyup="this.value=this.value.replace(/[^\a-\z\A-\Z0-9\@\._]/g,'');"
                           autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">登录密码<span class="required">*</span></label>
                <div class="layui-input-block">
                    <input type="text" id="password" name="password" lay-verify="required" maxlength="30"
                           autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">姓名<span class="required">*</span></label>
                <div class="layui-input-block">
                    <input type="text" id="name" name="name" lay-verify="required" maxlength="30"
                           autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">手机号码<span class="required">*</span></label>
                <div class="layui-input-block">
                    <input type="text" id="telPhone" name="telPhone"
                           lay-verify="required" maxlength="13"
                           onkeyup="value=value.replace(/[^\d]/g,'')"
                           autocomplete="off" class="layui-input">
                </div>
            </div>
        </div>
        <div class="avatar-right">
            <div style="text-align: center">
                <div id="avatarButton" class="avatarImage">
                    <img src="/static/home/images/avatar.jpg" class="avatar-img" id="upload">
                    <input type="hidden" name="avatar" id="avatar">
                </div>
            </div>
        </div>
        <div class="user-info">
            <div class="layui-form-item" pane>
                <label class="layui-form-label">性别</label>
                <div class="layui-input-block" th:with="dicts=${@dict.getType('sys_sex')}">
                    <input type="radio" name="sex"
                           th:each="dict : ${dicts}"
                           th:title="${dict.dictLabel}"
                           th:value="${dict.dictValue}"
                           th:attr="checked=${dict.dictValue eq '1'?true:false}">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">电子邮箱</label>
                <div class="layui-input-block">
                    <input type="text" id="email" name="email" maxlength="20"
                           autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">地址</label>
                <div class="layui-input-block">
                    <input type="text" id="address" name="address" maxlength="100"
                           autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item layui-form-text">
                <label class="layui-form-label" style="margin-bottom: 0;">描述</label>
                <div class="layui-input-block">
                    <textarea placeholder="请输入描述" id="description"
                              maxlength="200" autocomplete="off"
                              name="description" class="layui-textarea"></textarea>
                </div>
            </div>
        </div>
    </div>
    <div class="form-footer">
        <button type="button" class="button-sub" lay-submit lay-filter="saveBaseUser">提交</button>
        <button type="button" class="button-close" id="buttonClose">关闭</button>
    </div>
</form>
</body>
</html>